Namespace - LJCDBDataAccess
Returns
The result XML message.
Syntax
C# |
private DbResult Delete()
|
Deletes a record.
(E)
Remarks
This method is called from the
Execute()
method if the DbRequest.QueryType is "Delete".
Example
C# |
private static void Delete(DbDataAccess dbDataAccess
, DbColumns dataDefinition)
{
var keyColumns = new DbColumns()
{
{ "Name", (object)"TestNameUpdated" }
};
dataDefinition.LJCSetExcludeKeyValue("PrincipleFlag");
var queryKeyColumns = DbCommon.QueryKeys(keyColumns, dataDefinition);
DbRequest dbRequest = new DbRequest()
{
KeyColumns = queryKeyColumns
QueryType = QueryType.Delete.ToString(),
TableName = "PersonTest",
};
DbResult dbResult = dbDataAccess.Execute(dbRequest);
if (dbResult != null)
{
string sqlStatement = dbResult.ExecutedSql;
}
}
|